﻿using DomainModel;
using FluentNHibernate.Mapping;

namespace Repository.NHibernate.Mapping
{
    public class StudyYearMap : ClassMap<StudyYear>
    {
        public StudyYearMap()
        {
            Id(x => x.Id).GeneratedBy.Native();

            Map(x => x.BeginDate);
            Map(x => x.EndDate);

            HasMany(x => x.StudySemesters).Cascade.All();
        }
    }
}